package top.infopub.mgr.cap.dao;

import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import top.infopub.dto.cap.ContractReviewDto;
import top.infopub.generic.GenericDao;
import top.infopub.mgr.cap.domain.ContractReviewDomain;
import top.infopub.mgr.cap.vo.ContractReviewVo;
import top.infopub.model.cap.*;

import java.util.List;

@Repository
public interface ContractReviewDao extends GenericDao<ContractReview, String> {

    /**
     * 根据条件查询合同评审列表
     * @param contractReviewVo
     * @return
     * @see
     */
    Page<ContractReviewDomain> selectByDomainWhere(ContractReviewVo contractReviewVo);



    /*查询合同评审详情*/
    ContractReviewDto queryById(@Param("id")String id);

    /*查询借款合同*/
    List<ContractReviewLoad> queryConLoanDetails(@Param("proCode") String proCode);

    /*查询保证合同*/
    List<ContractGuarantyDetail> queryConGuaDetails(@Param("proCode") String proCode);

    /*查询质押合同*/
    List<ContractPledgeDetail> queryConPleDetails(@Param("proCode") String proCode);

    /*查询抵押合同*/
    List<ContractMortgageDetail> queryConMorDetails(@Param("proCode") String proCode);


    /**
     * 根据流程走向新增标书评审信息
     * @param contractReview
     */
    void insertByProcess(ContractReview contractReview);

    /**
     * 根据项目编码查询合同评审
     * @param proCode
     * @return
     */
    ContractReview queryByProCode(@Param("proCode") String proCode);
}
